Figures and Tables
Chapter 1 AppleScript, Scripts, and Scriptable Applications 3Figure 1-1 Changing text style with the mouse and with a script 4
Figure 1-2 A script that performs a repetitive action 6
Figure 1-3 A script that copies information from one application to another 8
Figure 1-4 Different ways to run a script 9
Chapter 2 Overview of AppleScript 13
Figure 2-1 How AppleScript works 15
Figure 2-2 How AppleScript gets the Scriptable Text Editor dictionary 20
Chapter 3 Values 33
Figure 3-1 Value class definition for lists 34
Figure 3-2 Coercions supported by AppleScript 69
Table 3-1 AppleScript value class identifiers 39
Chapter 4 Commands 71
Figure 4-1 Command definition for the Move command 77
Figure 4-2 The Scriptable Text Editor document "simple" 95
Table 4-1 Standard application commands defined in this chapter 85
Table 4-2 AppleScript commands defined in this chapter 86
Chapter 5 Objects and References 119
Figure 5-1 The Scriptable Text Editor's object class definition for
paragraph objects 121Figure 5-2 The Scriptable Text Editor document "simple" 137
Table 5-1 Reference forms 126
Table 5-2 Boolean expressions and tests in Filter references 142
Chapter 6 Expressions 149
Table 6-1 AppleScript operators 163
Table 6-2 Operator precedence 179
Chapter 8 Handlers 221
Figure 8-1 Scope of property and variable declarations at the top level
of a script 254Figure 8-2 Scope of property and variable declarations at the top level
of a script object 258Figure 8-3 Scope of variable declarations within a handler 263
Chapter 9 Script Objects 265
Figure 9-1 Relationship between a simple child script and its parent 273
Figure 9-2 Another child-parent relationship 273
Figure 9-3 A more complicated child-parent relationship 274
Appendix A The Language at a Glance 289
Table A-1 Command syntax 290
Table A-2 Reference form syntax 294
Table A-3 Container notation in references 296
Table A-4 Operators 297
Table A-5 Control statements 300
Table A-6 Handler definitions and calls 302
Table A-7 Script objects 303
Table A-8 Assignments and declarations 304
Table A-9 Predefined variables 305
Table A-10 Constants defined by AppleScript 305
Table A-11 Placeholders used in syntax descriptions 308
Appendix B Scriptable Text Editor Dictionary 313
Figure B-1 Bounds and Position properties of a Scriptable Text Editor window 327
Table B-1 Variations from standard behavior in Scriptable Text Editor versions of standard application commands 345
Table B-2 Other Scriptable Text Editor commands 347